/*
 * Copyright (c) 2025 Nuvoton Technology Corporation.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_NUMAKER_M333X_CLOCK_H
#define ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_NUMAKER_M333X_CLOCK_H

#define NUMAKER_CLK_CLKSEL0_HCLKSEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL0_HCLKSEL_LXT 0x00000001
#define NUMAKER_CLK_CLKSEL0_HCLKSEL_PLL 0x00000002
#define NUMAKER_CLK_CLKSEL0_HCLKSEL_LIRC 0x00000003
#define NUMAKER_CLK_CLKSEL0_HCLKSEL_HIRC 0x00000007
#define NUMAKER_CLK_CLKSEL0_STCLKSEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL0_STCLKSEL_LXT 0x00000008
#define NUMAKER_CLK_CLKSEL0_STCLKSEL_HXT_DIV2 0x00000010
#define NUMAKER_CLK_CLKSEL0_STCLKSEL_HCLK_DIV2 0x00000018
#define NUMAKER_CLK_CLKSEL0_STCLKSEL_HIRC_DIV2 0x00000038
#define NUMAKER_CLK_CLKSEL0_EADC0SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL0_EADC0SEL_PLL_DIV2 0x00000400
#define NUMAKER_CLK_CLKSEL0_SDH0SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL0_SDH0SEL_PLL_DIV2 0x00100000
#define NUMAKER_CLK_CLKSEL0_SDH0SEL_HCLK 0x00200000
#define NUMAKER_CLK_CLKSEL0_SDH0SEL_HIRC 0x00300000
#define NUMAKER_CLK_CLKSEL0_CANFD0SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL0_CANFD0SEL_PLL_DIV2 0x01000000
#define NUMAKER_CLK_CLKSEL0_CANFD0SEL_HCLK 0x02000000
#define NUMAKER_CLK_CLKSEL0_CANFD0SEL_HIRC 0x03000000
#define NUMAKER_CLK_CLKSEL0_CANFD1SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL0_CANFD1SEL_PLL_DIV2 0x04000000
#define NUMAKER_CLK_CLKSEL0_CANFD1SEL_HCLK 0x08000000
#define NUMAKER_CLK_CLKSEL0_CANFD1SEL_HIRC 0x0C000000
#define NUMAKER_CLK_CLKSEL1_WDT0SEL_LXT 0x00000001
#define NUMAKER_CLK_CLKSEL1_WDT0SEL_HCLK_DIV2048 0x00000002
#define NUMAKER_CLK_CLKSEL1_WDT0SEL_LIRC 0x00000003
#define NUMAKER_CLK_CLKSEL1_WDT1SEL_LXT 0x00000004
#define NUMAKER_CLK_CLKSEL1_WDT1SEL_HCLK_DIV2048 0x00000008
#define NUMAKER_CLK_CLKSEL1_WDT1SEL_LIRC 0x0000000C
#define NUMAKER_CLK_CLKSEL1_CLKOSEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL1_CLKOSEL_LXT 0x00000010
#define NUMAKER_CLK_CLKSEL1_CLKOSEL_HCLK 0x00000020
#define NUMAKER_CLK_CLKSEL1_CLKOSEL_HIRC 0x00000030
#define NUMAKER_CLK_CLKSEL1_CLKOSEL_LIRC 0x00000040
#define NUMAKER_CLK_CLKSEL1_CLKOSEL_PLL_DIV2 0x00000050
#define NUMAKER_CLK_CLKSEL1_TMR0SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL1_TMR0SEL_LXT 0x00000100
#define NUMAKER_CLK_CLKSEL1_TMR0SEL_PCLK0 0x00000200
#define NUMAKER_CLK_CLKSEL1_TMR0SEL_EXT 0x00000300
#define NUMAKER_CLK_CLKSEL1_TMR0SEL_LIRC 0x00000500
#define NUMAKER_CLK_CLKSEL1_TMR0SEL_HIRC 0x00000700
#define NUMAKER_CLK_CLKSEL1_TMR1SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL1_TMR1SEL_LXT 0x00001000
#define NUMAKER_CLK_CLKSEL1_TMR1SEL_PCLK0 0x00002000
#define NUMAKER_CLK_CLKSEL1_TMR1SEL_EXT 0x00003000
#define NUMAKER_CLK_CLKSEL1_TMR1SEL_LIRC 0x00005000
#define NUMAKER_CLK_CLKSEL1_TMR1SEL_HIRC 0x00007000
#define NUMAKER_CLK_CLKSEL1_TMR2SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL1_TMR2SEL_LXT 0x00010000
#define NUMAKER_CLK_CLKSEL1_TMR2SEL_PCLK1 0x00020000
#define NUMAKER_CLK_CLKSEL1_TMR2SEL_EXT 0x00030000
#define NUMAKER_CLK_CLKSEL1_TMR2SEL_LIRC 0x00050000
#define NUMAKER_CLK_CLKSEL1_TMR2SEL_HIRC 0x00070000
#define NUMAKER_CLK_CLKSEL1_TMR3SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL1_TMR3SEL_LXT 0x00100000
#define NUMAKER_CLK_CLKSEL1_TMR3SEL_PCLK1 0x00200000
#define NUMAKER_CLK_CLKSEL1_TMR3SEL_EXT 0x00300000
#define NUMAKER_CLK_CLKSEL1_TMR3SEL_LIRC 0x00500000
#define NUMAKER_CLK_CLKSEL1_TMR3SEL_HIRC 0x00700000
#define NUMAKER_CLK_CLKSEL1_UART0SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL1_UART0SEL_PLL_DIV2 0x01000000
#define NUMAKER_CLK_CLKSEL1_UART0SEL_LXT 0x02000000
#define NUMAKER_CLK_CLKSEL1_UART0SEL_HIRC 0x03000000
#define NUMAKER_CLK_CLKSEL1_UART1SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL1_UART1SEL_PLL_DIV2 0x04000000
#define NUMAKER_CLK_CLKSEL1_UART1SEL_LXT 0x08000000
#define NUMAKER_CLK_CLKSEL1_UART1SEL_HIRC 0x0C000000
#define NUMAKER_CLK_CLKSEL1_WWDT0SEL_HCLK_DIV2048 0x20000000
#define NUMAKER_CLK_CLKSEL1_WWDT0SEL_LIRC 0x30000000
#define NUMAKER_CLK_CLKSEL1_WWDT1SEL_HCLK_DIV2048 0x80000000
#define NUMAKER_CLK_CLKSEL1_WWDT1SEL_LIRC 0xC0000000
#define NUMAKER_CLK_CLKSEL2_EPWM0SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL2_EPWM0SEL_PCLK0 0x00000001
#define NUMAKER_CLK_CLKSEL2_EPWM1SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL2_EPWM1SEL_PCLK1 0x00000002
#define NUMAKER_CLK_CLKSEL2_QSPI0SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL2_QSPI0SEL_PLL_DIV2 0x00000004
#define NUMAKER_CLK_CLKSEL2_QSPI0SEL_PCLK0 0x00000008
#define NUMAKER_CLK_CLKSEL2_QSPI0SEL_HIRC 0x0000000C
#define NUMAKER_CLK_CLKSEL2_SPI0SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL2_SPI0SEL_PLL_DIV2 0x00000010
#define NUMAKER_CLK_CLKSEL2_SPI0SEL_PCLK1 0x00000020
#define NUMAKER_CLK_CLKSEL2_SPI0SEL_HIRC 0x00000030
#define NUMAKER_CLK_CLKSEL2_SPI1SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL2_SPI1SEL_PLL_DIV2 0x00000040
#define NUMAKER_CLK_CLKSEL2_SPI1SEL_PCLK0 0x00000080
#define NUMAKER_CLK_CLKSEL2_SPI1SEL_HIRC 0x000000C0
#define NUMAKER_CLK_CLKSEL2_BPWM0SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL2_BPWM0SEL_PCLK0 0x00000100
#define NUMAKER_CLK_CLKSEL2_BPWM1SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL2_BPWM1SEL_PCLK1 0x00000200
#define NUMAKER_CLK_CLKSEL2_SPI2SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL2_SPI2SEL_PLL_DIV2 0x00001000
#define NUMAKER_CLK_CLKSEL2_SPI2SEL_PCLK1 0x00002000
#define NUMAKER_CLK_CLKSEL2_SPI2SEL_HIRC 0x00003000
#define NUMAKER_CLK_CLKSEL2_BPWM2SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL2_BPWM2SEL_PCLK0 0x00010000
#define NUMAKER_CLK_CLKSEL2_BPWM3SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL2_BPWM3SEL_PCLK1 0x00020000
#define NUMAKER_CLK_CLKSEL2_BPWM4SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL2_BPWM4SEL_PCLK0 0x00040000
#define NUMAKER_CLK_CLKSEL2_BPWM5SEL_HCLK 0x00000000
#define NUMAKER_CLK_CLKSEL2_BPWM5SEL_PCLK1 0x00080000
#define NUMAKER_CLK_CLKSEL3_I2S0SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL3_I2S0SEL_PLL_DIV2 0x00010000
#define NUMAKER_CLK_CLKSEL3_I2S0SEL_PCLK0 0x00020000
#define NUMAKER_CLK_CLKSEL3_I2S0SEL_HIRC 0x00030000
#define NUMAKER_CLK_CLKSEL3_I3C0SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL3_I3C0SEL_HCLK 0x00040000
#define NUMAKER_CLK_CLKSEL3_I3C0SEL_PCLK0 0x00080000
#define NUMAKER_CLK_CLKSEL3_I3C0SEL_HIRC 0x000C0000
#define NUMAKER_CLK_CLKSEL3_UART2SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL3_UART2SEL_PLL_DIV2 0x01000000
#define NUMAKER_CLK_CLKSEL3_UART2SEL_LXT 0x02000000
#define NUMAKER_CLK_CLKSEL3_UART2SEL_HIRC 0x03000000
#define NUMAKER_CLK_CLKSEL3_UART3SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL3_UART3SEL_PLL_DIV2 0x04000000
#define NUMAKER_CLK_CLKSEL3_UART3SEL_LXT 0x08000000
#define NUMAKER_CLK_CLKSEL3_UART3SEL_HIRC 0x0C000000
#define NUMAKER_CLK_CLKSEL3_UART4SEL_HXT 0x00000000
#define NUMAKER_CLK_CLKSEL3_UART4SEL_PLL_DIV2 0x10000000
#define NUMAKER_CLK_CLKSEL3_UART4SEL_LXT 0x20000000
#define NUMAKER_CLK_CLKSEL3_UART4SEL_HIRC 0x30000000
#define NUMAKER_CLK_CLKDIV0_HCLK(x) (((x) - 1UL) << (0))
#define NUMAKER_CLK_CLKDIV0_SDH0(x) (((x) - 1UL) << (24))
#define NUMAKER_CLK_CLKDIV0_UART0(x) (((x) - 1UL) << (8))
#define NUMAKER_CLK_CLKDIV0_UART1(x) (((x) - 1UL) << (12))
#define NUMAKER_CLK_CLKDIV0_EADC0(x) (((x) - 1UL) << (16))
#define NUMAKER_CLK_CLKDIV1_UART2(x) (((x) - 1UL) << (0))
#define NUMAKER_CLK_CLKDIV1_UART3(x) (((x) - 1UL) << (4))
#define NUMAKER_CLK_CLKDIV1_UART4(x) (((x) - 1UL) << (8))
#define NUMAKER_CLK_CLKDIV1_I2S0(x) (((x) - 1UL) << (12))
#define NUMAKER_CLK_CLKDIV1_CANFD0(x) (((x) - 1UL) << (16))
#define NUMAKER_CLK_CLKDIV1_CANFD1(x) (((x) - 1UL) << (20))
#define NUMAKER_CLK_PCLKDIV_APB0DIV_DIV1 0x00000000
#define NUMAKER_CLK_PCLKDIV_APB0DIV_DIV2 0x00000001
#define NUMAKER_CLK_PCLKDIV_APB0DIV_DIV4 0x00000002
#define NUMAKER_CLK_PCLKDIV_APB0DIV_DIV8 0x00000003
#define NUMAKER_CLK_PCLKDIV_APB0DIV_DIV16 0x00000004
#define NUMAKER_CLK_PCLKDIV_APB1DIV_DIV1 0x00000000
#define NUMAKER_CLK_PCLKDIV_APB1DIV_DIV2 0x00000010
#define NUMAKER_CLK_PCLKDIV_APB1DIV_DIV4 0x00000020
#define NUMAKER_CLK_PCLKDIV_APB1DIV_DIV8 0x00000030
#define NUMAKER_CLK_PCLKDIV_APB1DIV_DIV16 0x00000040
#define NUMAKER_CLK_PLLCTL_PLLSRC_HXT 0x00000000
#define NUMAKER_CLK_PLLCTL_PLLSRC_HIRC_DIV4 0x00080000
#define NUMAKER_PDMA0_MODULE 0x00000001
#define NUMAKER_ISP_MODULE 0x00000002
#define NUMAKER_EBI_MODULE 0x00000003
#define NUMAKER_ST_MODULE 0x00000004
#define NUMAKER_SDH0_MODULE 0x00E83F06
#define NUMAKER_PDMA1_MODULE 0x00000005
#define NUMAKER_CRC_MODULE 0x00000007
#define NUMAKER_CANFD0_MODULE 0x00F07E08
#define NUMAKER_CANFD1_MODULE 0x00F47E89
#define NUMAKER_HSUSBD_MODULE 0x0000000A
#define NUMAKER_PDCI_MODULE 0x0000000B
#define NUMAKER_FMCIDLE_MODULE 0x0000000F
#define NUMAKER_USBH_MODULE 0x00500010
#define NUMAKER_CANRAM0_MODULE 0x00000011
#define NUMAKER_CANRAM1_MODULE 0x00000012
#define NUMAKER_TRACE_MODULE 0x00000013
#define NUMAKER_GPA_MODULE 0x00000018
#define NUMAKER_GPB_MODULE 0x00000019
#define NUMAKER_GPC_MODULE 0x0000001A
#define NUMAKER_GPD_MODULE 0x0000001B
#define NUMAKER_GPE_MODULE 0x0000001C
#define NUMAKER_GPF_MODULE 0x0000001D
#define NUMAKER_GPG_MODULE 0x0000001E
#define NUMAKER_GPH_MODULE 0x0000001F
#define NUMAKER_WDT0_MODULE 0x24C00000
#define NUMAKER_WDT1_MODULE 0x24C4001F
#define NUMAKER_WWDT0_MODULE 0x24F80018
#define NUMAKER_WWDT1_MODULE 0x24FC0019
#define NUMAKER_RTC_MODULE 0x20000001
#define NUMAKER_TMR0_MODULE 0x25D00002
#define NUMAKER_TMR1_MODULE 0x25D80003
#define NUMAKER_TMR2_MODULE 0x25E00004
#define NUMAKER_TMR3_MODULE 0x25E80005
#define NUMAKER_CLKO_MODULE 0x25C80006
#define NUMAKER_ACMP01_MODULE 0x20000007
#define NUMAKER_I2C0_MODULE 0x20000008
#define NUMAKER_I2C1_MODULE 0x20000009
#define NUMAKER_I2C2_MODULE 0x2000000A
#define NUMAKER_I3C0_MODULE 0x2CE4000B
#define NUMAKER_QSPI0_MODULE 0x28C4000C
#define NUMAKER_SPI0_MODULE 0x28C8000D
#define NUMAKER_SPI1_MODULE 0x28CC000E
#define NUMAKER_SPI2_MODULE 0x28D8000F
#define NUMAKER_UART0_MODULE 0x24F03D10
#define NUMAKER_UART1_MODULE 0x24F43D91
#define NUMAKER_UART2_MODULE 0x2CF07C12
#define NUMAKER_UART3_MODULE 0x2CF47C93
#define NUMAKER_UART4_MODULE 0x2CF87D14
#define NUMAKER_EADC0_MODULE 0x20543E1C
#define NUMAKER_I2S0_MODULE 0x2CE07D9D
#define NUMAKER_HSOTG_MODULE 0x2000001E
#define NUMAKER_USCI0_MODULE 0x40000008
#define NUMAKER_USCI1_MODULE 0x40000009
#define NUMAKER_EPWM0_MODULE 0x48400010
#define NUMAKER_EPWM1_MODULE 0x48420011
#define NUMAKER_BPWM0_MODULE 0x48500012
#define NUMAKER_BPWM1_MODULE 0x48520013
#define NUMAKER_EQEI0_MODULE 0x40000014
#define NUMAKER_ECAP0_MODULE 0x4000001A
#define NUMAKER_BPWM2_MODULE 0x4860001C
#define NUMAKER_BPWM3_MODULE 0x4862001D
#define NUMAKER_BPWM4_MODULE 0x4864001E
#define NUMAKER_BPWM5_MODULE 0x4866001F
#define NUMAKER_LLSI0_MODULE 0x60000000
#define NUMAKER_LLSI1_MODULE 0x60000001
#define NUMAKER_LLSI2_MODULE 0x60000002
#define NUMAKER_LLSI3_MODULE 0x60000003
#define NUMAKER_LLSI4_MODULE 0x60000004
#define NUMAKER_LLSI5_MODULE 0x60000005
#define NUMAKER_LLSI6_MODULE 0x60000006
#define NUMAKER_LLSI7_MODULE 0x60000007
#define NUMAKER_LLSI8_MODULE 0x60000008
#define NUMAKER_LLSI9_MODULE 0x60000009
#define NUMAKER_ELLSI0_MODULE 0x6000000A
#define NUMAKER_CLK_PMUCTL_PDMSEL_NPD0 0x00000002
#define NUMAKER_CLK_PMUCTL_PDMSEL_NPD1 0x00000000
#define NUMAKER_CLK_PMUCTL_PDMSEL_NPD2 0x00000001
#define NUMAKER_CLK_PMUCTL_PDMSEL_SPD 0x00000004
#define NUMAKER_CLK_PMUCTL_PDMSEL_DPD 0x00000006
#define NUMAKER_CLK_PMUCTL_PDMSEL_FWPD 0x00000002
#define NUMAKER_CLK_PMUCTL_PDMSEL_NPD 0x00000000
#define NUMAKER_CLK_PMUCTL_PDMSEL_LLPD 0x00000001

#endif
